Skip to content

[CLI-332] Add optional HelpFormatter Function to document Deprecated options#271

Merged
garydgregory merged 4 commits into
apache:masterfrom
Claudenw:CLI-332_Add_deprecated_info_to_HelpFormatter
May 11, 2024
Merged

[CLI-332] Add optional HelpFormatter Function to document Deprecated options#271
garydgregory merged 4 commits into
apache:masterfrom
Claudenw:CLI-332_Add_deprecated_info_to_HelpFormatter

Conversation

@Claudenw

@Claudenw Claudenw commented May 11, 2024

Copy link
Copy Markdown
Contributor

Implement new feature CLI-332

Added a BiFunction<String, Object, String> to the HelpFormatter and its Builder. Also tests for same.

@Claudenw Claudenw self-assigned this May 11, 2024
@Claudenw Claudenw requested a review from garydgregory May 11, 2024 14:37
@codecov-commenter

codecov-commenter commented May 11, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.83%. Comparing base (9f6b23b) to head (66df78f).
⚠️ Report is 727 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #271      +/-   ##
============================================
+ Coverage     91.90%   95.83%   +3.92%     
- Complexity      575      658      +83     
============================================
  Files            22       23       +1     
  Lines          1247     1367     +120     
  Branches        210      226      +16     
============================================
+ Hits           1146     1310     +164     
+ Misses           63       25      -38     
+ Partials         38       32       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Claudenw Claudenw requested a review from epugh May 11, 2024 14:48
* @param showDeprecatedFunc Specify the format for the deprecated options.
* @return this.
*/
public Builder setShowDeprecated(final BiFunction<String, Option, String> showDeprecatedFunc) {

@garydgregory garydgregory May 11, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new public or protected API needs a @since tag, which for semantic versioning would be 1.8.0.

*
* @param showDeprecatedFunc Specify the format for the deprecated options.
* @return this.
* @since(1.8.0)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no parens in Javadoc tags, it's not a function call ;-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@garydgregory garydgregory changed the title CLI-332: added ability to display deprecation information in help output [CLI-332] Add ability to display deprecation information in help output May 11, 2024
@garydgregory garydgregory changed the title [CLI-332] Add ability to display deprecation information in help output [CLI-332] Add optional HelpFormatter Function to document Deprecated options May 11, 2024
@garydgregory garydgregory merged commit 7aac2dd into apache:master May 11, 2024
@Claudenw Claudenw deleted the CLI-332_Add_deprecated_info_to_HelpFormatter branch May 15, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants